package com.study.spmongodb.wwj.thread2.char18;

import org.apache.commons.lang3.StringUtils;

/**
 * @author MI
 * @version 1.0
 * @date 2020/12/9 21:07
 */
public class Servant implements ActiveObject {
    @Override
    public Result makeString(int count, char fillChar) {
        final String repeat = StringUtils.repeat(fillChar, count);
        return new RealResult(repeat);
    }

    @Override
    public void displayString(String text) {
        System.out.println("displayString>" + text);
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
